<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePaylog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('paylog', function (Blueprint $table) {
            $table->id();
            $table->string('trade_no', 50)->nullable()->comment('业务单号');
            $table->string('transaction_no', 100)->nullable()->comment('第三方流水号');
            $table->integer('seller_id')->default(0);
            $table->integer('user_id')->default(0);
            $table->string('description', 100)->nullable()->comment('交易说明');
            $table->float('money', 10, 2)->default(0)->comment('交易金额');
            $table->integer('status')->default(0)->comment('交易状态');
            $table->integer('relate_type')->default(0)->comment('交易类型');
            $table->integer('relate_id')->default(0)->comment('关联ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('paylog');
    }
}
